// Package userForm
// Date        : 2023/3/9 16:25
// Version     : 1.0.0
// Author      : 代码小学生王木木
// Email       : 18574945291@163.com
// Description :
package userForm

type UserSearchForm struct {
	//form.PaginateForm
	SearchKey  string `json:"searchKey" form:"searchKey" binding:"-"`
	UserType   int    `form:"userType" json:"userType" binding:"-"`
	UserStatus bool   `form:"userStatus" json:"userStatus" binding:"-"`
	CreateDate string `form:"createDate" json:"createDate" binding:"-"`
}

type CreateUserForm struct {
	Phone    string `binding:"required,mobile" json:"phone" form:"phone"`
	UserName string `binding:"required,min=2" json:"userName" form:"userName"`
	Password string `binding:"required,min=6,max=30" json:"password" form:"password"`
	IsAdmin  int    `binding:"required" json:"isAdmin" form:"isAdmin"`
}
type ChangeUserPerForm struct {
	ID            int    `json:"id" form:"id" binding:"required"`
	PermissionTag string `binding:"required,oneof=cms wechat" json:"permission_tag" form:"permission_tag"`
	Value         bool   `binding:"-" json:"value" form:"value"`
}

type DeactivateUserForm struct {
	Uid int `json:"uid" form:"uid" binding:"required"`
}

// ResetPwdForm
// @Description: 重置密码的form
type ResetPwdForm struct {
	Id        int64  `json:"id" json:"id" binding:"required"`
	Password  string `form:"password" json:"password" binding:"required,min=6,max=30"`
	Password2 string `form:"password2" json:"password2" binding:"required,min=6,max=30"`
}
